

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>mindspore.numpy.bartlett &mdash; MindSpore master documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
        <script src="../../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="mindspore.numpy.blackman" href="mindspore.numpy.blackman.html" />
    <link rel="prev" title="mindspore.numpy.asfarray" href="mindspore.numpy.asfarray.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../index.html" class="icon icon-home"> MindSpore
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">MindSpore Python API</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../mindspore.html">mindspore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.common.initializer.html">mindspore.common.initializer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.communication.html">mindspore.communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.compression.html">mindspore.compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.context.html">mindspore.context</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.html">mindspore.dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.audio.html">mindspore.dataset.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.config.html">mindspore.dataset.config</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.text.html">mindspore.dataset.text</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.transforms.html">mindspore.dataset.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.vision.html">mindspore.dataset.vision</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.mindrecord.html">mindspore.mindrecord</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.html">mindspore.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.probability.html">mindspore.nn.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.transformer.html">mindspore.nn.transformer</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../mindspore.numpy.html">mindspore.numpy</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../mindspore.numpy.html#array-generation">Array Generation</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arange.html">mindspore.numpy.arange</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.array.html">mindspore.numpy.array</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.asarray.html">mindspore.numpy.asarray</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.asfarray.html">mindspore.numpy.asfarray</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">mindspore.numpy.bartlett</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.blackman.html">mindspore.numpy.blackman</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.copy.html">mindspore.numpy.copy</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.diag.html">mindspore.numpy.diag</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.diag_indices.html">mindspore.numpy.diag_indices</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.diagflat.html">mindspore.numpy.diagflat</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.diagonal.html">mindspore.numpy.diagonal</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.empty.html">mindspore.numpy.empty</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.empty_like.html">mindspore.numpy.empty_like</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.eye.html">mindspore.numpy.eye</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.full.html">mindspore.numpy.full</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.full_like.html">mindspore.numpy.full_like</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.geomspace.html">mindspore.numpy.geomspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.hamming.html">mindspore.numpy.hamming</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.hanning.html">mindspore.numpy.hanning</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.histogram_bin_edges.html">mindspore.numpy.histogram_bin_edges</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.identity.html">mindspore.numpy.identity</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.indices.html">mindspore.numpy.indices</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ix_.html">mindspore.numpy.ix</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.linspace.html">mindspore.numpy.linspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logspace.html">mindspore.numpy.logspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.meshgrid.html">mindspore.numpy.meshgrid</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.mgrid.html">mindspore.numpy.mgrid</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ogrid.html">mindspore.numpy.ogrid</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ones.html">mindspore.numpy.ones</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ones_like.html">mindspore.numpy.ones_like</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.pad.html">mindspore.numpy.pad</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.trace.html">mindspore.numpy.trace</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tri.html">mindspore.numpy.tri</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tril.html">mindspore.numpy.tril</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tril_indices.html">mindspore.numpy.tril_indices</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tril_indices_from.html">mindspore.numpy.tril_indices_from</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.triu.html">mindspore.numpy.triu</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.triu_indices.html">mindspore.numpy.triu_indices</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.triu_indices_from.html">mindspore.numpy.triu_indices_from</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.vander.html">mindspore.numpy.vander</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.zeros.html">mindspore.numpy.zeros</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.zeros_like.html">mindspore.numpy.zeros_like</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#array-operation">Array Operation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#logic">Logic</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#math">Math</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.ops.html">mindspore.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.parallel.html">mindspore.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.parallel.nn.html">mindspore.parallel.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.profiler.html">mindspore.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.scipy.html">mindspore.scipy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.train.html">mindspore.train</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.boost.html">mindspore.boost</a></li>
</ul>
<p class="caption"><span class="caption-text">MindSpore C++ API</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.mindspore.cn/lite/api/zh-CN/master/api_cpp/mindspore.html">MindSpore Lite↗</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../index.html">MindSpore</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../mindspore.numpy.html">mindspore.numpy</a> &raquo;</li>
        
      <li>mindspore.numpy.bartlett</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/api_python/numpy/mindspore.numpy.bartlett.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="mindspore-numpy-bartlett">
<h1>mindspore.numpy.bartlett<a class="headerlink" href="#mindspore-numpy-bartlett" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="mindspore.numpy.bartlett">
<code class="sig-prename descclassname">mindspore.numpy.</code><code class="sig-name descname">bartlett</code><span class="sig-paren">(</span><em class="sig-param">M</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/mindspore/numpy/array_creations.html#bartlett"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mindspore.numpy.bartlett" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Bartlett window.
The Bartlett window is very similar to a triangular window, except that the
end points are at zero. It is often used in signal processing for tapering a
signal, without generating too much ripple in the frequency domain.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>M</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – Number of points in the output window. If zero or less, an empty
array is returned.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Tensor, the triangular window, with the maximum value normalized to one
(the value one appears only if the number of samples is odd), with the
first and last samples equal to zero.</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/library/exceptions.html#TypeError" title="(in Python v3.8)"><strong>TypeError</strong></a> – If <cite>M</cite> is not an int.</p>
</dd>
</dl>
<dl class="simple">
<dt>Supported Platforms:</dt><dd><p><code class="docutils literal notranslate"><span class="pre">Ascend</span></code> <code class="docutils literal notranslate"><span class="pre">GPU</span></code> <code class="docutils literal notranslate"><span class="pre">CPU</span></code></p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">mindspore.numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">bartlett</span><span class="p">(</span><span class="mi">12</span><span class="p">))</span>
<span class="go">[0.         0.18181819 0.36363637 0.5454545  0.72727275 0.9090909</span>
<span class="go">0.9090909  0.72727275 0.5454545  0.36363637 0.18181819 0.        ]</span>
</pre></div>
</div>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="mindspore.numpy.blackman.html" class="btn btn-neutral float-right" title="mindspore.numpy.blackman" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="mindspore.numpy.asfarray.html" class="btn btn-neutral float-left" title="mindspore.numpy.asfarray" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2021, MindSpore.

    </p>
  </div>
    
    
    
    Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>